package top.yxf.spring.test.bean.service;

import top.yxf.spring.beans.factory.annotation.Value;
import top.yxf.spring.stereotype.Component;

@Component("userService")
public class UserService implements IUserService {

    @Value("${token}")
    private String token;

    public UserService() {

    }

    @Override
    public String queryUser() {
        return "query user info success----->" + token;
    }

    @Override
    public String register(String userName) {
        return "register" + userName + "success";
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getToken() {
        return token;
    }

    @Override
    public String toString() {
        return "UserService{" +
                "token='" + token + '\'' +
                '}';
    }
}
